package com.heima.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.validation.constraints.Max;

@Data
@TableName("tb_sku_class")
@ApiModel(description = "商品类型实体类")
public class SkuClass {
    @TableId(value = "class_id", type = IdType.AUTO)
    private Integer classId;

    @TableField(value = "class_name")
    @Max(value = 10,message = "类型名不能超过10个字")
    private String className;

    @TableField(value = "parent_id")
    private Integer parentId;
}
